package cn.mynb.util;

import java.util.Calendar;

public class UtilDate {

	public static String getAP_PM() {
		int am_pm = Calendar.getInstance().get(Calendar.AM_PM);
		switch (am_pm) {
		case 0:
			return "上午";
		case 1:
			return "下午";
		}
		return "获得AM_PM失败" ;
	}

	public static String getWeek() {

		int week = Calendar.getInstance().get(Calendar.DAY_OF_WEEK) - 1;

		switch (week) {
		case 0:
			return "星期日";
		case 1:
			return "星期一";
		case 2:
			return "星期二";
		case 3:
			return "星期三";
		case 4:
			return "星期四";
		case 5:
			return "星期五";
		case 6:
			return "星期六";
		}
		return "日前操作失败";
	}
}
